<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns all transitions for the timezone</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="datetimezone.getoffset.html">DateTimeZone::getOffset</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="datetimezone.listabbreviations.html">DateTimeZone::listAbbreviations</a></div>
 <div class="up"><a href="class.datetimezone.html">DateTimeZone</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="datetimezone.gettransitions" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">DateTimeZone::getTransitions</h1>
  <h1 class="refname">timezone_transitions_get</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.0)</p><p class="refpurpose"><span class="refname">DateTimeZone::getTransitions</span> -- <span class="refname">timezone_transitions_get</span> &mdash; <span class="dc-title">Returns all transitions for the timezone</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-datetimezone.gettransitions-description">
  <h3 class="title">说明</h3>
  <p class="para">面向对象风格</p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span> <span class="methodname"><strong>DateTimeZone::getTransitions</strong></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$timestamp_begin</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$timestamp_end</code></span>
  ]] )</div>

  <p class="para rdfs-comment">过程化风格</p>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><a href="function.timezone-transitions-get.html" class="methodname">timezone_transitions_get</a></span>
    ( <span class="methodparam"><span class="type"><a href="class.datetimezone.html" class="type DateTimeZone">DateTimeZone</a></span> <code class="parameter">$object</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$timestamp_begin</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$timestamp_end</code></span>
  ]] )</div>

 </div>


 <div class="refsect1 parameters" id="refsect1-datetimezone.gettransitions-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    <dt>
<em><code class="parameter">
object</code></em></dt>
<dd>
<p class="para">仅过程化风格：由 <span class="function"><a href="function.timezone-open.html" class="function">timezone_open()</a></span> 返回的
<a href="class.datetimezone.html" class="classname">DateTimeZone</a> 对象。</p></dd>

    
     <dt>
<em><code class="parameter">timestamp_begin</code></em></dt>

     <dd>

      <p class="para">
       Begin timestamp.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">timestamp_end</code></em></dt>

     <dd>

      <p class="para">
       End timestamp.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-datetimezone.gettransitions-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns numerically indexed array containing associative array with all
   transitions on success 或者在失败时返回 <strong><code>FALSE</code></strong>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-datetimezone.gettransitions-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.3.0</td>
       <td>
        The optional <em><code class="parameter">timestamp_begin</code></em> and <em><code class="parameter">timestamp_end</code></em> 
        were added.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-datetimezone.gettransitions-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2216">
    <p><strong>Example #1 A <span class="function"><a href="function.timezone-transitions-get.html" class="function">timezone_transitions_get()</a></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$timezone&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">"Europe/London"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$transitions&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$timezone</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getTransitions</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">array_slice</span><span style="color: #007700">(</span><span style="color: #0000BB">$transitions</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [0] =&gt; Array
        (
            [ts] =&gt; -9223372036854775808
            [time] =&gt; -292277022657-01-27T08:29:52+0000
            [offset] =&gt; 3600
            [isdst] =&gt; 1
            [abbr] =&gt; BST
        )

    [1] =&gt; Array
        (
            [ts] =&gt; -1691964000
            [time] =&gt; 1916-05-21T02:00:00+0000
            [offset] =&gt; 3600
            [isdst] =&gt; 1
            [abbr] =&gt; BST
        )

    [2] =&gt; Array
        (
            [ts] =&gt; -1680472800
            [time] =&gt; 1916-10-01T02:00:00+0000
            [offset] =&gt; 0
            [isdst] =&gt; 
            [abbr] =&gt; GMT
        )

)
</pre></div>
    </div>
   </div>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="datetimezone.getoffset.html">DateTimeZone::getOffset</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="datetimezone.listabbreviations.html">DateTimeZone::listAbbreviations</a></div>
 <div class="up"><a href="class.datetimezone.html">DateTimeZone</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
